
#ifndef __javascript_Invoke_h__
#define __javascript_Invoke_h__
#pragma once

#include <map>
using std::map;


class IJavaScriptInvoker
{
public:
	virtual CString GetCode(map<CString, CString> const& params) = 0;
	virtual CString GetCode() = 0;
};


class JavaScriptInvoker : public IJavaScriptInvoker
{
public:
	JavaScriptInvoker()
		:m_strNoImplements( L"alert('No implements'); " )
	{
		
	}

	virtual CString GetCode(map<CString, CString> const& params)
	{
		return m_strNoImplements;
	}
	virtual CString GetCode()
	{
		return m_strNoImplements;
	}

private:
	const CString m_strNoImplements;

};

class js_main : public JavaScriptInvoker
{
public:
	js_main()
	{
	}

	virtual CString GetCode()
	{
		return L"main();";
	}

	operator CString()
	{
		return GetCode();
	}
private:

};




#endif